package hhq.demo.ctrl;

import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

// login controller
@RestController
public class IndexController {

    // 主页跳转
    @RequestMapping(value = "/")
    public String index(HttpServletResponse response) {
        // return "forward:" + "/index.html";
        try {
            response.sendRedirect("index.html");
        } catch (IOException e) {
            System.err.println(e.toString());
        }
        return "";
    }


}